<?php
/*
=====================================================
 Generic Toolbox - by Carl Wells
-----------------------------------------------------
-----------------------------------------------------
 Copyright (c) 2009 Carl Wells
=====================================================
 THIS IS COPYRIGHTED SOFTWARE
 PLEASE READ THE LICENSE AGREEMENT
=====================================================
 File: system/addcategory.php
-----------------------------------------------------
 Purpose: This file performs function adds Categories to the database by passing POST variables to the dbCategory class.
=====================================================
*/

// ----------------------------------------------
//  include CONFIG file
// ----------------------------------------------    
 	require 'config/config.php';
 	
 
// ----------------------------------------------
//  Instantiate MAIN CORE class
// ----------------------------------------------    
 	require 'core/main.class.php';
 	$MAIN = new main();  
 	$action = $MAIN->getAction();
 	
 	
 	require 'db/dbCategory.class.php';
 	$UPDATE = new DbCategory();
 	
 	$UPDATE->addCategory( $_POST['editCategoryName'], $_POST['SubCategoryName'], $_POST['sectorId'], $_POST['group']);

 	foreach ( $_POST as $key => $val ) {
 		echo ("$key : $val<br/>");
 	}
 	
    

?>

